<?
error_reporting(E_ALL); ini_set('display_errors', '1');

$settings = array(
  "oneall_subdomain"=>"acmecms",
  "site_public_key"=>"3207c85c-b9b2-4cff-8ed0-06700c364646",
  "site_private_key"=>"52671928-ef83-4be3-a51f-a3131b0f0f14"
);
include_once("oneall.process.php");

if(isset($_REQUEST["out"])) {
   session_destroy();
	header("location:http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}");
}  elseif(isset($_SESSION["name1"])) {
	return include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR."userbox.php");
}  

?>
<style>
#social_login{height:200px}
#container{width:180px;position:relative;margin:0 auto}
#content{width:520px;min-height:500px}
a:link,a:visited{color:#27b;text-decoration:none}
a:hover{text-decoration:underline}
a img{border-width:0}
#topnav{font-size:11px;line-height:23px;text-align:right;padding:10px 0 12px}
#topnav 
#topnav a.signin:hover{background:transparent url(<?='http://' . $_SERVER['SERVER_NAME'] . str_replace($_SERVER['DOCUMENT_ROOT'],'',dirname(__FILE__)) . '/'?>images/signin-nav-bg-hover-ie.png) no-repeat 0 0;padding:4px 12px 6px}
#topnav a.signin,#topnav a.signin:hover{background-position:0 3px!important}
a.signin{position:relative;margin-left:3px}
a.signin span{background-image:url(<?='http://' . $_SERVER['SERVER_NAME'] . str_replace($_SERVER['DOCUMENT_ROOT'],'',dirname(__FILE__)) . '/'?>images/toggle_down_light.png);background-repeat:no-repeat;background-position:100% 50%;padding:4px 16px 6px 0}
#topnav a.menu-open{background:#ddeef6!important;color:#666!important;outline:none}
#small_signup{display:inline;float:none;line-height:23px;width:170px;margin:25px 0 0}
a.signin.menu-open span{background-image:url(<?='http://' . $_SERVER['SERVER_NAME'] . str_replace($_SERVER['DOCUMENT_ROOT'],'',dirname(__FILE__)) . '/'?>images/toggle_up_dark.png);color:#789}
#signin_menu{-moz-border-radius-topleft:5px;-moz-border-radius-bottomleft:5px;-moz-border-radius-bottomright:5px;-webkit-border-top-left-radius:5px;-webkit-border-bottom-left-radius:5px;-webkit-border-bottom-right-radius:5px;display:none;background-color:#ddeef6;position:absolute;width:210px;z-index:100;border:1px transparent;text-align:left;top:28px;right:80px;margin-top:5px;margin-right:-1px;font-size:11px;padding:12px}
#signin_menu input[type=text],#signin_menu input[type=password]{display:block;-moz-border-radius:4px;-webkit-border-radius:4px;border:1px solid #ACE;font-size:13px;width:203px;margin:0 0 5px;padding:5px}
#signin_submit{-moz-border-radius:4px;-webkit-border-radius:4px;background:#39d url(<?='http://' . $_SERVER['SERVER_NAME'] . str_replace($_SERVER['DOCUMENT_ROOT'],'',dirname(__FILE__)) . '/'?>images/bg-btn-blue.png) repeat-x scroll 0 0;border:1px solid #39D;color:#fff;text-shadow:0 -1px 0 #39d;font-size:11px;font-weight:700;margin:0 5px 0 0;padding:4px 10px 5px}
#signin_submit::-moz-focus-inner{border:0;padding:0}
#signin_submit:hover,#signin_submit:focus{background-position:0 -5px;cursor:pointer}
.tipsy-inner{line-height:1.5em;max-width:200px;font:11px 'Lucida Grande', sans-serif;font-weight:700;-moz-border-radius:4px;-khtml-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background-color:#000;color:#FFF;text-align:left;padding:8px}
.tipsy{opacity:.8;filter:alpha(opacity=80);background-repeat:no-repeat;padding:5px}
.tipsy-north{background-image:url(<?='http://' . $_SERVER['SERVER_NAME'] . str_replace($_SERVER['DOCUMENT_ROOT'],'',dirname(__FILE__)) . '/'?>images/tipsy-north.gif);background-position:top center}
.tipsy-south{background-image:url(<?='http://' . $_SERVER['SERVER_NAME'] . str_replace($_SERVER['DOCUMENT_ROOT'],'',dirname(__FILE__)) . '/'?>images/tipsy-south.gif);background-position:bottom center}
.tipsy-east{background-image:url(<?='http://' . $_SERVER['SERVER_NAME'] . str_replace($_SERVER['DOCUMENT_ROOT'],'',dirname(__FILE__)) . '/'?>images/tipsy-east.gif);background-position:right center}
.tipsy-west{background-image:url(<?='http://' . $_SERVER['SERVER_NAME'] . str_replace($_SERVER['DOCUMENT_ROOT'],'',dirname(__FILE__)) . '/'?>images/tipsy-west.gif);background-position:left center}
</style>

<div id="topnav" class="topnav"><a  href='javascript:void(0)' class="signin"><span>Sign in</span></a>
</div>
  <fieldset id="signin_menu">
		<? include_once('reglogin.php') ?>
		<br><h3>-- OR Login using --</h3><br>
		<?  include_once('oneall.php')  ?>
  </fieldset>
  
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<?
    $tipsypath = 'http://' . $_SERVER['SERVER_NAME'] . str_replace($_SERVER['DOCUMENT_ROOT'],'',dirname(__FILE__)) . '/javascripts/jquery.tipsy.js';
?>
<script src='<?=$tipsypath?>'></script>

<script>
        $(document).ready(function() {	  
            $(".signin").click(function(e) {        
					e.preventDefault();
						$("fieldset#signin_menu").toggle();
						$(".signin").toggleClass("menu-open");
          });
			$("fieldset#signin_menu").mouseup(function() {
				return false
			});
			$(document).mouseup(function(e) {
				if($(e.target).parent("a.signin").length==0) {
					$(".signin").removeClass("menu-open");
					$("fieldset#signin_menu").hide();
				}
			});			
        });
    $(function() {
	  $('#forgot_username_link').tipsy({gravity: 'w'});   
    });
</script>
 